package com.itcast.ssm.service.impl;

import com.itcast.ssm.mapper.OrderMapper;
import com.itcast.ssm.pojo.Order;
import com.itcast.ssm.response.OwnerOrder;
import com.itcast.ssm.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单 服务实现类
 * </p>
 *
 * @author 三人行
 * @since 2020-09-12
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderMapper orderMapper;

    @Override
    public List<OwnerOrder> findAll(Integer ownerId, Integer orderStatus) {
        return orderMapper.findAll(ownerId, orderStatus);
    }

    @Override
    public Integer delete(Integer orderId) {
        return orderMapper.delete(orderId);
    }

    @Override
    public Integer rentOut(Integer orderId) {
        return orderMapper.rentOut(orderId);
    }
}
